Code quality: everything now compiles without warnings on MSVC
This commit is contained in:
@@ -103,7 +103,7 @@ void bench(isc::numeric_type dtype, std::string operation)
|
||||
double total_time = 0;\
|
||||
while(total_time*1e-9 < 1e-3){\
|
||||
std::list<isc::driver::Event> events;\
|
||||
flush = isc::zeros(1e6, 1, dtype);\
|
||||
flush = isc::zeros((isaac::int_t)1e6, 1, dtype);\
|
||||
queue.synchronize();\
|
||||
OP;\
|
||||
queue.synchronize();\
|
||||
@@ -205,7 +205,7 @@ void bench(isc::numeric_type dtype, std::string operation)
|
||||
std::cout << N;
|
||||
isc::array x(N, dtype), y(N, dtype);
|
||||
/* ISAAC */
|
||||
std::list<isc::driver::Event> events;\
|
||||
std::list<isc::driver::Event> events;
|
||||
BENCHMARK_ISAAC(y = isc::control(x + alpha*y, isc::execution_options_type(0, &events)), 3*N*dtsize/t)
|
||||
/* clblas */
|
||||
#ifdef BENCH_CLBLAS
|
||||
|
2
python/setup.py
Normal file → Executable file
2
python/setup.py
Normal file → Executable file
@@ -115,7 +115,7 @@ def main():
|
||||
include =' src/include'.split() + ['external/boost/include', os.path.join(find_module("numpy")[1], "core", "include")]
|
||||
|
||||
#Source files
|
||||
src = 'src/lib/wrap/clBLAS.cpp src/lib/value_scalar.cpp src/lib/kernels/parse.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/stream.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/keywords.cpp src/lib/kernels/binder.cpp src/lib/array.cpp src/lib/symbolic/preset.cpp src/lib/symbolic/expression.cpp src/lib/symbolic/execute.cpp src/lib/symbolic/io.cpp src/lib/model/model.cpp src/lib/model/predictors/random_forest.cpp src/lib/exception/unknown_datatype.cpp src/lib/exception/operation_not_supported.cpp src/lib/driver/program.cpp src/lib/driver/event.cpp src/lib/driver/device.cpp src/lib/driver/context.cpp src/lib/driver/program_cache.cpp src/lib/driver/platform.cpp src/lib/driver/ndrange.cpp src/lib/driver/kernel.cpp src/lib/driver/handle.cpp src/lib/driver/command_queue.cpp src/lib/driver/check.cpp src/lib/driver/buffer.cpp src/lib/driver/backend.cpp '.split() + [os.path.join('src', 'wrap', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'model.cpp', 'exceptions.cpp']]
|
||||
src = 'src/lib/wrap/clBLAS.cpp src/lib/value_scalar.cpp src/lib/symbolic/preset.cpp src/lib/symbolic/io.cpp src/lib/symbolic/expression.cpp src/lib/symbolic/execute.cpp src/lib/model/predictors/random_forest.cpp src/lib/model/model.cpp src/lib/kernels/templates/ger.cpp src/lib/kernels/templates/gemv.cpp src/lib/kernels/templates/gemm.cpp src/lib/kernels/templates/dot.cpp src/lib/kernels/templates/base.cpp src/lib/kernels/templates/axpy.cpp src/lib/kernels/stream.cpp src/lib/kernels/parse.cpp src/lib/kernels/mapped_object.cpp src/lib/kernels/keywords.cpp src/lib/kernels/binder.cpp src/lib/exception/unknown_datatype.cpp src/lib/exception/operation_not_supported.cpp src/lib/driver/program_cache.cpp src/lib/driver/program.cpp src/lib/driver/platform.cpp src/lib/driver/ndrange.cpp src/lib/driver/kernel.cpp src/lib/driver/handle.cpp src/lib/driver/event.cpp src/lib/driver/device.cpp src/lib/driver/context.cpp src/lib/driver/command_queue.cpp src/lib/driver/check.cpp src/lib/driver/buffer.cpp src/lib/driver/backend.cpp src/lib/array.cpp '.split() + [os.path.join('src', 'wrap', sf) for sf in ['_isaac.cpp', 'core.cpp', 'driver.cpp', 'model.cpp', 'exceptions.cpp']]
|
||||
boostsrc = 'external/boost/libs/'
|
||||
for s in ['numpy','python','smart_ptr','system','thread']:
|
||||
src = src + [x for x in recursive_glob('external/boost/libs/' + s + '/src/','.cpp') if 'win32' not in x and 'pthread' not in x]
|
||||
|
@@ -20,8 +20,8 @@ void test_element_wise_vector(T epsilon, simple_vector_base<T> & cx, simple_vect
|
||||
cl_command_queue clqueue = queue.handle().cl();
|
||||
int_t N = cz.size();
|
||||
|
||||
T aa = -4.3;
|
||||
T bb=3.5;
|
||||
T aa = static_cast<T>(-4.3);
|
||||
T bb = static_cast<T>(3.5);
|
||||
isaac::value_scalar a(aa), b(bb);
|
||||
isaac::scalar da(a, context), db(b, context);
|
||||
|
||||
@@ -149,11 +149,11 @@ int main()
|
||||
std::cout << "Device: " << device.name() << " on " << device.platform().name() << " " << device.platform().version() << std::endl;
|
||||
std::cout << "---" << std::endl;
|
||||
std::cout << ">> float" << std::endl;
|
||||
test_impl<float>(1e-4, *context);
|
||||
test_impl<float>(eps_float, *context);
|
||||
if(device.fp64_support())
|
||||
{
|
||||
std::cout << ">> double" << std::endl;
|
||||
test_impl<double>(1e-9, *context);
|
||||
test_impl<double>(eps_double, *context);
|
||||
}
|
||||
std::cout << "---" << std::endl;
|
||||
}
|
||||
|
@@ -7,6 +7,9 @@
|
||||
|
||||
typedef isaac::int_t int_t;
|
||||
|
||||
static const float eps_float = static_cast<float>(1e-4);
|
||||
static const double eps_double = static_cast<double>(1e-8);
|
||||
|
||||
template<class T> struct BLAS;
|
||||
template<> struct BLAS<float> { template<class FT, class DT> static FT F(FT SAXPY, DT ) { return SAXPY; } };
|
||||
template<> struct BLAS<double> { template<class FT, class DT> static DT F(FT , DT DAXPY) { return DAXPY; } };
|
||||
|
@@ -99,11 +99,11 @@ int main()
|
||||
std::cout << "Device: " << device.name() << " on " << device.platform().name() << " " << device.platform().version() << std::endl;
|
||||
std::cout << "---" << std::endl;
|
||||
std::cout << ">> float" << std::endl;
|
||||
test_impl<float>(1e-4, *context);
|
||||
test_impl<float>(eps_float, *context);
|
||||
if(device.fp64_support())
|
||||
{
|
||||
std::cout << ">> double" << std::endl;
|
||||
test_impl<double>(1e-9, *context);
|
||||
test_impl<double>(eps_double, *context);
|
||||
}
|
||||
std::cout << "---" << std::endl;
|
||||
}
|
||||
|
@@ -136,11 +136,11 @@ int main()
|
||||
std::cout << "Device: " << device.name() << " on " << device.platform().name() << " " << device.platform().version() << std::endl;
|
||||
std::cout << "---" << std::endl;
|
||||
std::cout << ">> float" << std::endl;
|
||||
test_impl<float>(1e-4, *context);
|
||||
test_impl<float>(eps_float, *context);
|
||||
if(device.fp64_support())
|
||||
{
|
||||
std::cout << ">> double" << std::endl;
|
||||
test_impl<double>(1e-9, *context);
|
||||
test_impl<double>(eps_double, *context);
|
||||
}
|
||||
std::cout << "---" << std::endl;
|
||||
}
|
||||
|
@@ -18,7 +18,8 @@ void test_row_wise_reduction(T epsilon, simple_vector_base<T> & cy, simple_matri
|
||||
simple_vector<T> bufy(M);
|
||||
simple_vector<T> bufx(N);
|
||||
|
||||
T alpha = 4.2, beta = 5.6;
|
||||
T alpha = static_cast<T>(4.2);
|
||||
T beta = static_cast<T>(5.6);
|
||||
|
||||
isc::driver::CommandQueue queue = isc::driver::backend::queues::get(y.context(),0);
|
||||
|
||||
@@ -116,11 +117,11 @@ int main()
|
||||
std::cout << "Device: " << device.name() << " on " << device.platform().name() << " " << device.platform().version() << std::endl;
|
||||
std::cout << "---" << std::endl;
|
||||
std::cout << ">> float" << std::endl;
|
||||
test_impl<float>(1e-4, *context);
|
||||
test_impl<float>(eps_float, *context);
|
||||
if(device.fp64_support())
|
||||
{
|
||||
std::cout << ">> double" << std::endl;
|
||||
test_impl<double>(1e-9, *context);
|
||||
test_impl<double>(eps_double, *context);
|
||||
}
|
||||
std::cout << "---" << std::endl;
|
||||
}
|
||||
|
@@ -19,7 +19,8 @@ void test(T epsilon, simple_matrix_base<T> & cA, simple_matrix_base<T>& cB, simp
|
||||
int_t N = cC.size2();
|
||||
|
||||
|
||||
T aa = 3.12, bb=3.5;
|
||||
T aa = static_cast<T>(3.12);
|
||||
T bb = static_cast<T>(3.5);
|
||||
isaac::value_scalar a(aa), b(bb);
|
||||
isaac::scalar da(a, ctx), db(b, ctx);
|
||||
|
||||
@@ -132,11 +133,11 @@ int main()
|
||||
std::cout << "Device: " << device.name() << " on " << device.platform().name() << " " << device.platform().version() << std::endl;
|
||||
std::cout << "---" << std::endl;
|
||||
std::cout << ">> float" << std::endl;
|
||||
test_impl<float>(1e-4, *context);
|
||||
test_impl<float>(eps_float, *context);
|
||||
if(device.fp64_support())
|
||||
{
|
||||
std::cout << ">> double" << std::endl;
|
||||
test_impl<double>(1e-9, *context);
|
||||
test_impl<double>(eps_double, *context);
|
||||
}
|
||||
std::cout << "---" << std::endl;
|
||||
}
|
||||
|
Reference in New Issue
Block a user