Skip to content

Commit

Permalink
Merge pull request #7 from gunrock/remove-architecture_t
Browse files Browse the repository at this point in the history
Replace architecture_t with compute_capbility_t
  • Loading branch information
Cameron Shinn authored Nov 11, 2020
2 parents ca299f5 + b8c1cab commit de2606f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
10 changes: 5 additions & 5 deletions gunrock/cuda/context.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct context_t {

virtual const cuda::device_properties_t& props() const = 0;
virtual void print_properties() = 0;
virtual int ptx_version() const = 0;
virtual cuda::compute_capability_t ptx_version() const = 0;
virtual cuda::stream_t stream() = 0;

// cudaStreamSynchronize or cudaDeviceSynchronize for stream 0.
Expand All @@ -45,7 +45,7 @@ struct context_t {
class standard_context_t : public context_t {
protected:
cuda::device_properties_t _props;
cuda::architecture_t _ptx_version;
cuda::compute_capability_t _ptx_version;

cuda::device_id_t _ordinal;
cuda::stream_t _stream;
Expand All @@ -60,7 +60,7 @@ class standard_context_t : public context_t {
cuda::function_attributes_t attr;
error::error_t status = cudaFuncGetAttributes(&attr, dummy_k<0>);
error::throw_if_exception(status);
_ptx_version = attr.ptxVersion;
_ptx_version = cuda::make_compute_capability(attr.ptxVersion);

cudaSetDevice(_ordinal);
cudaStreamCreate(&_stream);
Expand All @@ -85,7 +85,7 @@ class standard_context_t : public context_t {
cuda::properties::print(_props);
}

virtual cuda::architecture_t ptx_version() const override {
virtual cuda::compute_capability_t ptx_version() const override {
return _ptx_version;
}
virtual cuda::stream_t stream() override { return _stream; }
Expand Down Expand Up @@ -124,4 +124,4 @@ class multi_context_t {
}; // class multi_context_t

} // namespace cuda
} // namespace gunrock
} // namespace gunrock
1 change: 0 additions & 1 deletion gunrock/cuda/device_properties.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ namespace gunrock {
namespace cuda {

typedef cudaDeviceProp device_properties_t;
typedef int architecture_t;

typedef struct {
unsigned major;
Expand Down

0 comments on commit de2606f

Please sign in to comment.