mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-13 01:05:36 +00:00
GPU clean up, remove parallel_for. Split into accelerator_loop, thread_loop
cases, and collides with parallel_for in thrust
This commit is contained in:
parent
9d866d062a
commit
8c91e82ee8
@ -117,7 +117,6 @@ auto innerProduct (const iMatrix<l,N>& lhs,const iMatrix<r,N>& rhs) -> iScalar<d
|
|||||||
{
|
{
|
||||||
typedef decltype(innerProduct(lhs._internal[0][0],rhs._internal[0][0])) ret_t;
|
typedef decltype(innerProduct(lhs._internal[0][0],rhs._internal[0][0])) ret_t;
|
||||||
iScalar<ret_t> ret;
|
iScalar<ret_t> ret;
|
||||||
iScalar<ret_t> tmp;
|
|
||||||
ret=Zero();
|
ret=Zero();
|
||||||
for(int c1=0;c1<N;c1++){
|
for(int c1=0;c1<N;c1++){
|
||||||
for(int c2=0;c2<N;c2++){
|
for(int c2=0;c2<N;c2++){
|
||||||
|
@ -46,34 +46,6 @@ Author: paboyle <paboyle@ph.ed.ac.uk>
|
|||||||
|
|
||||||
#define UNROLL _Pragma("unroll")
|
#define UNROLL _Pragma("unroll")
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Old primitives; shortly deprecate
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef GRID_OMP
|
|
||||||
#define PARALLEL_FOR_LOOP _Pragma("omp parallel for schedule(static)")
|
|
||||||
#define PARALLEL_FOR_LOOP_INTERN _Pragma("omp for schedule(static)")
|
|
||||||
#define PARALLEL_NESTED_LOOP2 _Pragma("omp parallel for collapse(2)")
|
|
||||||
#define PARALLEL_NESTED_LOOP5 _Pragma("omp parallel for collapse(5)")
|
|
||||||
#define PARALLEL_REGION _Pragma("omp parallel")
|
|
||||||
#define PARALLEL_CRITICAL _Pragma("omp critical")
|
|
||||||
#else
|
|
||||||
#define PARALLEL_FOR_LOOP
|
|
||||||
#define PARALLEL_FOR_LOOP_INTERN
|
|
||||||
#define PARALLEL_FOR_LOOP_REDUCE(op, var)
|
|
||||||
#define PARALLEL_NESTED_LOOP2
|
|
||||||
#define PARALLEL_NESTED_LOOP5
|
|
||||||
#define PARALLEL_REGION
|
|
||||||
#define PARALLEL_CRITICAL
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define parallel_region PARALLEL_REGION
|
|
||||||
#define parallel_for PARALLEL_FOR_LOOP for
|
|
||||||
#define parallel_for_internal PARALLEL_FOR_LOOP_INTERN for
|
|
||||||
#define parallel_for_nest2 PARALLEL_NESTED_LOOP2 for
|
|
||||||
#define parallel_for_nest5 PARALLEL_NESTED_LOOP5 for
|
|
||||||
#define parallel_critical PARALLEL_CRITICAL
|
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
// New primitives; explicit host thread calls, and accelerator data parallel calls
|
// New primitives; explicit host thread calls, and accelerator data parallel calls
|
||||||
//////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
Reference in New Issue
Block a user