-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pfor using data_items but no real synchronization yet
- Loading branch information
Showing
7 changed files
with
205 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,59 @@ | ||
#ifndef ALLSCALE_FRAGMENT_HPP | ||
#define ALLSCALE_FRAGMENT_HPP | ||
|
||
|
||
#include <hpx/include/serialization.hpp> | ||
#include <memory> | ||
|
||
namespace allscale | ||
{ | ||
template<typename Region, typename T> | ||
struct fragment | ||
{ | ||
public: | ||
using value_type = T; | ||
using region_type = Region; | ||
|
||
fragment () | ||
{ | ||
} | ||
|
||
fragment(Region const& r,T t) : region_(r) | ||
{ | ||
T *tmp = new T(t); | ||
ptr_ = std::shared_ptr<T> (tmp); | ||
} | ||
|
||
void resize(fragment const& fragment, Region const& region) | ||
{ | ||
} | ||
|
||
fragment mask(fragment const& fragment, Region const& region) | ||
{ | ||
} | ||
|
||
void insert(fragment & destination, fragment const& source, Region const& region) | ||
{ | ||
} | ||
|
||
template<typename Archive> | ||
void save(Archive& ar, fragment const& fragment) | ||
{ | ||
} | ||
|
||
|
||
template<typename Archive> | ||
void serialize(Archive & ar, unsigned) | ||
{ | ||
ar & region_; | ||
ar & ptr_; | ||
} | ||
|
||
template<typename Archive> | ||
void load(Archive& ar, fragment & fragment) | ||
{ | ||
} | ||
|
||
Region region_; | ||
std::shared_ptr<T> ptr_; | ||
}; | ||
#include <iostream> | ||
namespace allscale { | ||
template<typename Region, typename T> | ||
struct fragment { | ||
public: | ||
using value_type = T; | ||
using region_type = Region; | ||
|
||
fragment() { | ||
} | ||
|
||
fragment(Region const& r, T t) : | ||
region_(r) { | ||
T *tmp = new T(t); | ||
ptr_ = std::shared_ptr < T > (tmp); | ||
} | ||
|
||
fragment(Region const& r, std::shared_ptr<T> ptr ) : | ||
region_(r), | ||
ptr_(ptr) | ||
{ | ||
|
||
} | ||
|
||
void resize(fragment const& fragment, Region const& region) { | ||
} | ||
|
||
fragment mask(fragment const& fragment, Region const& region) { | ||
} | ||
|
||
void insert(fragment & destination, fragment const& source, | ||
Region const& region) { | ||
} | ||
|
||
template<typename Archive> | ||
void save(Archive& ar, fragment const& fragment) { | ||
} | ||
|
||
template<typename Archive> | ||
void serialize(Archive & ar, unsigned) { | ||
ar & region_; | ||
ar & ptr_; | ||
} | ||
|
||
template<typename Archive> | ||
void load(Archive& ar, fragment & fragment) { | ||
} | ||
|
||
Region region_; | ||
std::shared_ptr<T> ptr_; | ||
}; | ||
} | ||
|
||
#endif |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,9 @@ int hpx_main(int argc, char **argv) | |
allscale::scheduler::stop(); | ||
} | ||
|
||
|
||
|
||
|
||
return hpx::finalize(); | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.