mirror of
https://github.com/CNugteren/CLBlast.git
synced 2024-08-20 20:12:26 +02:00
Fixed an issue where the xAMAX tester would incorrectly report failures when testing against CBLAS
This commit is contained in:
parent
eaf1de5745
commit
3b81ee2c08
|
@ -274,6 +274,9 @@ def wrapper_cblas(routines):
|
||||||
postfix += "_sub"
|
postfix += "_sub"
|
||||||
indent += " "
|
indent += " "
|
||||||
extra_argument += ",\n"+indent+"reinterpret_cast<return_pointer_"+flavour.buffertype[:-1]+">(&"+output_buffer+"_buffer["+output_buffer+"_offset])"
|
extra_argument += ",\n"+indent+"reinterpret_cast<return_pointer_"+flavour.buffertype[:-1]+">(&"+output_buffer+"_buffer["+output_buffer+"_offset])"
|
||||||
|
elif output_buffer in routine.IndexBuffers():
|
||||||
|
assignment = "((int*)&"+output_buffer+"_buffer[0])["+output_buffer+"_offset] = "
|
||||||
|
indent += " "*len(assignment)
|
||||||
else:
|
else:
|
||||||
assignment = output_buffer+"_buffer["+output_buffer+"_offset]"
|
assignment = output_buffer+"_buffer["+output_buffer+"_offset]"
|
||||||
if (flavour.name in ["Sc","Dz"]):
|
if (flavour.name in ["Sc","Dz"]):
|
||||||
|
|
|
@ -378,26 +378,26 @@ void cblasXasum(const size_t n,
|
||||||
void cblasXamax(const size_t n,
|
void cblasXamax(const size_t n,
|
||||||
std::vector<float>& imax_buffer, const size_t imax_offset,
|
std::vector<float>& imax_buffer, const size_t imax_offset,
|
||||||
const std::vector<float>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
const std::vector<float>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
||||||
imax_buffer[imax_offset] = cblas_isamax(n,
|
((int*)&imax_buffer[0])[imax_offset] = cblas_isamax(n,
|
||||||
&x_buffer[x_offset], static_cast<int>(x_inc));
|
&x_buffer[x_offset], static_cast<int>(x_inc));
|
||||||
}
|
}
|
||||||
void cblasXamax(const size_t n,
|
void cblasXamax(const size_t n,
|
||||||
std::vector<double>& imax_buffer, const size_t imax_offset,
|
std::vector<double>& imax_buffer, const size_t imax_offset,
|
||||||
const std::vector<double>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
const std::vector<double>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
||||||
imax_buffer[imax_offset] = cblas_idamax(n,
|
((int*)&imax_buffer[0])[imax_offset] = cblas_idamax(n,
|
||||||
&x_buffer[x_offset], static_cast<int>(x_inc));
|
&x_buffer[x_offset], static_cast<int>(x_inc));
|
||||||
}
|
}
|
||||||
void cblasXamax(const size_t n,
|
void cblasXamax(const size_t n,
|
||||||
std::vector<float2>& imax_buffer, const size_t imax_offset,
|
std::vector<float2>& imax_buffer, const size_t imax_offset,
|
||||||
const std::vector<float2>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
const std::vector<float2>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
||||||
imax_buffer[imax_offset] = cblas_icamax(n,
|
((int*)&imax_buffer[0])[imax_offset] = cblas_icamax(n,
|
||||||
reinterpret_cast<const float*>(&x_buffer[x_offset]), static_cast<int>(x_inc));
|
reinterpret_cast<const float*>(&x_buffer[x_offset]), static_cast<int>(x_inc));
|
||||||
}
|
}
|
||||||
void cblasXamax(const size_t n,
|
void cblasXamax(const size_t n,
|
||||||
std::vector<double2>& imax_buffer, const size_t imax_offset,
|
std::vector<double2>& imax_buffer, const size_t imax_offset,
|
||||||
const std::vector<double2>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
const std::vector<double2>& x_buffer, const size_t x_offset, const size_t x_inc) {
|
||||||
imax_buffer[imax_offset] = cblas_izamax(n,
|
((int*)&imax_buffer[0])[imax_offset] = cblas_izamax(n,
|
||||||
reinterpret_cast<const double*>(&x_buffer[x_offset]), static_cast<int>(x_inc));
|
reinterpret_cast<const double*>(&x_buffer[x_offset]), static_cast<int>(x_inc));
|
||||||
}
|
}
|
||||||
|
|
||||||
// =================================================================================================
|
// =================================================================================================
|
||||||
|
|
Loading…
Reference in a new issue