Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
openfpm_numerics
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sbalzarini Lab
Software
Parallel Computing
OpenFPM
openfpm_numerics
Commits
d6600250
Commit
d6600250
authored
1 year ago
by
Abhinav Singh
Browse files
Options
Downloads
Patches
Plain Diff
fix: GPU temporal expression performance
parent
f31559a7
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Operators/Vector/vector_dist_operators.hpp
+39
-1
39 additions, 1 deletion
src/Operators/Vector/vector_dist_operators.hpp
with
39 additions
and
1 deletion
src/Operators/Vector/vector_dist_operators.hpp
+
39
−
1
View file @
d6600250
...
...
@@ -835,14 +835,40 @@ struct vector_dist_expression_comp_proxy_sel
{
vector_dist_op_compute_op
<
0
,
false
,
vector_dist_expression_comp_sel
<
comp_dev
,
cond_
>::
type
::
value
>
::
compute_expr
(
v
,
v_exp
);}
};
template
<
unsigned
int
prp
,
typename
vector
>
class
vector_dist_expression
;
template
<
typename
v_exp
>
struct
transform_if_temporal
{
template
<
typename
T
>
static
auto
transform
(
T
&
v
)
->
decltype
(
v
)
{
return
v
;
}
};
template
<
typename
T
>
struct
transform_if_temporal
<
vector_dist_expression
<
0
,
openfpm
::
vector_gpu
<
aggregate
<
T
>>>>
{
template
<
typename
T_
>
static
auto
transform
(
T_
&
v
)
->
decltype
(
v
.
getVector
().
toKernel
())
{
return
v
.
getVector
().
toKernel
();
}
};
template
<
>
struct
vector_dist_expression_comp_proxy_sel
<
false
>
{
template
<
bool
cond
,
typename
v_type
,
typename
exp_type
>
static
void
compute
(
v_type
&
v
,
exp_type
&
v_exp
)
{
auto
v_ker
=
v
.
toKernel
();
auto
v_exp_transformed
=
transform_if_temporal
<
typename
std
::
remove_const
<
exp_type
>::
type
>::
transform
(
v_exp
);
vector_dist_op_compute_op
<
0
,
false
,
vector_dist_expression_comp_sel
<
comp_dev
,
cond
>::
type
::
value
>
::
compute_expr
(
v_ker
,
v_exp
);}
::
compute_expr
(
v_ker
,
v_exp
_transformed
);}
};
template
<
typename
vector
,
bool
is_ker
=
has_vector_kernel
<
vector
>
::
type
::
value
>
...
...
@@ -1512,12 +1538,24 @@ public:
{
return
base
::
operator
=
(
v_exp
);
}
vector
&
operator
=
(
const
vector_dist_expression
<
0
,
openfpm
::
vector_gpu
<
aggregate
<
T
>>>
&
v_exp
)
{
return
base
::
operator
=
(
v_exp
);
}
vector
&
equalGPU
(
const
vector_dist_expression
<
0
,
openfpm
::
vector_gpu
<
aggregate
<
T
>>>
&
v_exp
)
{
return
base
::
operator
=
(
v_exp
);
}
template
<
typename
exp1
,
typename
exp2
,
unsigned
int
op
>
vector
&
operator
=
(
const
vector_dist_expression_op
<
exp1
,
exp2
,
op
>
&
v_exp
)
{
return
base
::
operator
=
(
v_exp
);
}
};
template
<
typename
T
>
using
texp_v
=
vector_dist_expression
<
0
,
openfpm
::
vector
<
aggregate
<
T
>>>
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment