@@ -33,40 +33,40 @@ __global__ void zshift_matrix(cuDoubleComplex* A, int n, double shift) {
33
33
if (idx < n) A[(idx)*n + idx].x += shift;
34
34
}
35
35
36
- __global__ void sshift_mgpu_matrix (float * A, int * off_m, int * off_n,
37
- int offsize, int ldH, float shift) {
36
+ __global__ void sshift_mgpu_matrix (float * A, std:: size_t * off_m, std:: size_t * off_n,
37
+ std:: size_t offsize, std:: size_t ldH, float shift) {
38
38
int i = blockIdx.x * blockDim.x + threadIdx.x ;
39
- int ind;
39
+ std:: size_t ind;
40
40
if (i < offsize){
41
41
ind = off_n[i] * ldH + off_m[i];
42
42
A[ind] += shift;
43
43
}
44
44
}
45
45
46
- __global__ void dshift_mgpu_matrix (double * A, int * off_m, int * off_n,
47
- int offsize, int ldH, double shift) {
46
+ __global__ void dshift_mgpu_matrix (double * A, std:: size_t * off_m, std:: size_t * off_n,
47
+ std:: size_t offsize, std:: size_t ldH, double shift) {
48
48
int i = blockIdx.x * blockDim.x + threadIdx.x ;
49
- int ind;
49
+ std:: size_t ind;
50
50
if (i < offsize){
51
51
ind = off_n[i] * ldH + off_m[i];
52
52
A[ind] += shift;
53
53
}
54
54
}
55
55
56
- __global__ void cshift_mgpu_matrix (cuComplex* A, int * off_m, int * off_n,
57
- int offsize, int ldH, float shift) {
56
+ __global__ void cshift_mgpu_matrix (cuComplex* A, std:: size_t * off_m, std:: size_t * off_n,
57
+ std:: size_t offsize, std:: size_t ldH, float shift) {
58
58
int i = blockIdx.x * blockDim.x + threadIdx.x ;
59
- int ind;
59
+ std:: size_t ind;
60
60
if (i < offsize){
61
61
ind = off_n[i] * ldH + off_m[i];
62
62
A[ind].x += shift;
63
63
}
64
64
}
65
65
66
- __global__ void zshift_mgpu_matrix (cuDoubleComplex* A, int * off_m, int * off_n,
67
- int offsize, int ldH, double shift) {
66
+ __global__ void zshift_mgpu_matrix (cuDoubleComplex* A, std:: size_t * off_m, std:: size_t * off_n,
67
+ std:: size_t offsize, std:: size_t ldH, double shift) {
68
68
int i = blockIdx.x * blockDim.x + threadIdx.x ;
69
- int ind;
69
+ std:: size_t ind;
70
70
if (i < offsize){
71
71
ind = off_n[i] * ldH + off_m[i];
72
72
A[ind].x += shift;
@@ -101,8 +101,8 @@ void chase_shift_matrix(std::complex<double>* A, int n, double shift,
101
101
reinterpret_cast <cuDoubleComplex*>(A), n, shift);
102
102
}
103
103
104
- void chase_shift_mgpu_matrix (float * A, int * off_m, int * off_n,
105
- int offsize, int ldH, float shift,
104
+ void chase_shift_mgpu_matrix (float * A, std:: size_t * off_m, std:: size_t * off_n,
105
+ std:: size_t offsize, std:: size_t ldH, float shift,
106
106
cudaStream_t stream_) {
107
107
108
108
unsigned int grid = (offsize + 256 - 1 ) / 256 ;
@@ -114,8 +114,8 @@ void chase_shift_mgpu_matrix(float* A, int* off_m, int* off_n,
114
114
}
115
115
116
116
117
- void chase_shift_mgpu_matrix (double * A, int * off_m, int * off_n,
118
- int offsize, int ldH, double shift,
117
+ void chase_shift_mgpu_matrix (double * A, std:: size_t * off_m, std:: size_t * off_n,
118
+ std:: size_t offsize, std:: size_t ldH, double shift,
119
119
cudaStream_t stream_) {
120
120
121
121
unsigned int grid = (offsize + 256 - 1 ) / 256 ;
@@ -126,8 +126,8 @@ void chase_shift_mgpu_matrix(double* A, int* off_m, int* off_n,
126
126
127
127
}
128
128
129
- void chase_shift_mgpu_matrix (std::complex<float >* A, int * off_m, int * off_n,
130
- int offsize, int ldH, float shift,
129
+ void chase_shift_mgpu_matrix (std::complex<float >* A, std:: size_t * off_m, std:: size_t * off_n,
130
+ std:: size_t offsize, std:: size_t ldH, float shift,
131
131
cudaStream_t stream_) {
132
132
133
133
unsigned int grid = (offsize + 256 - 1 ) / 256 ;
@@ -140,8 +140,8 @@ void chase_shift_mgpu_matrix(std::complex<float>* A, int* off_m, int* off_n,
140
140
}
141
141
142
142
143
- void chase_shift_mgpu_matrix (std::complex<double >* A, int * off_m, int * off_n,
144
- int offsize, int ldH, double shift,
143
+ void chase_shift_mgpu_matrix (std::complex<double >* A, std:: size_t * off_m, std:: size_t * off_n,
144
+ std:: size_t offsize, std:: size_t ldH, double shift,
145
145
cudaStream_t stream_) {
146
146
147
147
unsigned int grid = (offsize + 256 - 1 ) / 256 ;
0 commit comments