| /petsc/src/sys/classes/viewer/impls/binary/ftn-custom/ |
| H A D | zbinvf90.c | 20 PETSC_EXTERN void petscviewerbinarywriteint_(PetscViewer *viewer, PetscInt *a, PetscInt *len, Petsc… in petscviewerbinarywriteint_() argument 24 *ierr = PetscViewerBinaryWrite(v, a, *len, PETSC_INT); in petscviewerbinarywriteint_() 27 PETSC_EXTERN void petscviewerbinarywritescalar_(PetscViewer *viewer, PetscScalar *a, PetscInt *len,… in petscviewerbinarywritescalar_() argument 31 *ierr = PetscViewerBinaryWrite(v, a, *len, PETSC_SCALAR); in petscviewerbinarywritescalar_() 34 PETSC_EXTERN void petscviewerbinarywritereal_(PetscViewer *viewer, PetscReal *a, PetscInt *len, Pet… in petscviewerbinarywritereal_() argument 38 *ierr = PetscViewerBinaryWrite(v, a, *len, PETSC_REAL); in petscviewerbinarywritereal_() 41 PETSC_EXTERN void petscviewerbinaryreadint_(PetscViewer *viewer, PetscInt *a, PetscInt *len, PetscI… in petscviewerbinaryreadint_() argument 46 *ierr = PetscViewerBinaryRead(v, a, *len, count, PETSC_INT); in petscviewerbinaryreadint_() 49 PETSC_EXTERN void petscviewerbinaryreadscalar_(PetscViewer *viewer, PetscScalar *a, PetscInt *len, … in petscviewerbinaryreadscalar_() argument 54 *ierr = PetscViewerBinaryRead(v, a, *len, count, PETSC_SCALAR); in petscviewerbinaryreadscalar_() [all …]
|
| /petsc/src/sys/classes/draw/utils/ |
| H A D | lg.c | 30 if (lg->loc + lg->dim >= lg->len) { /* allocate more space */ in PetscDrawLGAddCommonPoint() 32 …PetscCall(PetscMalloc2(lg->len + lg->dim * PETSC_DRAW_LG_CHUNK_SIZE, &tmpx, lg->len + lg->dim * PE… in PetscDrawLGAddCommonPoint() 33 PetscCall(PetscArraycpy(tmpx, lg->x, lg->len)); in PetscDrawLGAddCommonPoint() 34 PetscCall(PetscArraycpy(tmpy, lg->y, lg->len)); in PetscDrawLGAddCommonPoint() 38 lg->len += lg->dim * PETSC_DRAW_LG_CHUNK_SIZE; in PetscDrawLGAddCommonPoint() 81 if (lg->loc + lg->dim >= lg->len) { /* allocate more space */ in PetscDrawLGAddPoint() 83 …PetscCall(PetscMalloc2(lg->len + lg->dim * PETSC_DRAW_LG_CHUNK_SIZE, &tmpx, lg->len + lg->dim * PE… in PetscDrawLGAddPoint() 84 PetscCall(PetscArraycpy(tmpx, lg->x, lg->len)); in PetscDrawLGAddPoint() 85 PetscCall(PetscArraycpy(tmpy, lg->y, lg->len)); in PetscDrawLGAddPoint() 89 lg->len += lg->dim * PETSC_DRAW_LG_CHUNK_SIZE; in PetscDrawLGAddPoint() [all …]
|
| H A D | dscatter.c | 90 sp->len = dim * PETSC_DRAW_SP_CHUNK_SIZE; in PetscDrawSPSetDimension() 199 if (sp->loc + sp->dim >= sp->len) { /* allocate more space */ in PetscDrawSPAddPoint() 201 …Call(PetscMalloc3(sp->len + sp->dim * PETSC_DRAW_SP_CHUNK_SIZE, &tmpx, sp->len + sp->dim * PETSC_D… in PetscDrawSPAddPoint() 202 PetscCall(PetscArraycpy(tmpx, sp->x, sp->len)); in PetscDrawSPAddPoint() 203 PetscCall(PetscArraycpy(tmpy, sp->y, sp->len)); in PetscDrawSPAddPoint() 204 PetscCall(PetscArraycpy(tmpz, sp->z, sp->len)); in PetscDrawSPAddPoint() 209 sp->len += sp->dim * PETSC_DRAW_SP_CHUNK_SIZE; in PetscDrawSPAddPoint() 250 if (sp->loc + n * sp->dim >= sp->len) { /* allocate more space */ in PetscDrawSPAddPoints() 254 …PetscCall(PetscMalloc3(sp->len + sp->dim * chunk, &tmpx, sp->len + sp->dim * chunk, &tmpy, sp->len… in PetscDrawSPAddPoints() 255 PetscCall(PetscArraycpy(tmpx, sp->x, sp->len)); in PetscDrawSPAddPoints() [all …]
|
| /petsc/src/benchmarks/streams/ |
| H A D | CUDAVersion.cu | 42 __global__ void set_array(float *a, float value, size_t len) in set_array() argument 45 while (idx < len) { in set_array() 51 __global__ void set_array_double(double *a, double value, size_t len) in set_array_double() argument 54 while (idx < len) { in set_array_double() 60 __global__ void STREAM_Copy(float *a, float *b, size_t len) in STREAM_Copy() argument 63 while (idx < len) { in STREAM_Copy() 69 __global__ void STREAM_Copy_double(double *a, double *b, size_t len) in STREAM_Copy_double() argument 72 while (idx < len) { in STREAM_Copy_double() 78 __global__ void STREAM_Copy_Optimized(float *a, float *b, size_t len) in STREAM_Copy_Optimized() argument 84 if (blockDim.x * gridDim.x < len) return; in STREAM_Copy_Optimized() [all …]
|
| /petsc/src/vec/is/is/utils/ |
| H A D | isblock.c | 25 PetscInt isz, len, i, j, ival, bbs; in ISCompressIndicesGeneral() local 47 PetscCall(ISGetLocalSize(is_in[i], &len)); in ISCompressIndicesGeneral() 53 len = len / bs; in ISCompressIndicesGeneral() 55 …PetscCall(ISCreateGeneral(PetscObjectComm((PetscObject)is_in[i]), len, idx, PETSC_COPY_VALUES, is_… in ISCompressIndicesGeneral() 67 for (j = 0; j < len; j++) { in ISCompressIndicesGeneral() 128 PetscInt len, i, j, k, *nidx; in ISExpandIndicesGeneral() local 136 PetscCall(ISGetLocalSize(is_in[i], &len)); in ISExpandIndicesGeneral() 137 if (len > maxsz) maxsz = len; in ISExpandIndicesGeneral() 142 PetscCall(ISGetLocalSize(is_in[i], &len)); in ISExpandIndicesGeneral() 144 for (j = 0; j < len; ++j) { in ISExpandIndicesGeneral() [all …]
|
| /petsc/src/vec/is/sf/tutorials/ |
| H A D | ex1.c | 197 PetscInt len; in main() local 211 len = 0; in main() 213 len += 5; in main() 215 PetscCall(PetscSNPrintf(buf + len, 256 - len, "%5c", rootdata[i])); in main() 216 len += 5; in main() 222 len = 0; in main() 224 len += 5; in main() 226 PetscCall(PetscSNPrintf(buf + len, 256 - len, "%5c", leafdata[i])); in main() 227 len += 5; in main() 280 PetscInt len; in main() local [all …]
|
| /petsc/src/ksp/pc/impls/deflation/ |
| H A D | deflationspace.c | 60 PetscInt i, j, len, ilo, ihi, *Iidx, m, M; in PCDeflationGetSpaceHaar() local 65 len = pow(2, size); in PCDeflationGetSpaceHaar() 66 PetscCall(PetscMalloc2(len, &col, len, &Iidx)); in PCDeflationGetSpaceHaar() 68 for (i = 0; i < len; i++) col[i] = val; in PCDeflationGetSpaceHaar() 74 PetscCall(MatSetSizes(defl, m, PETSC_DECIDE, M, PetscCeilInt(M, len))); in PCDeflationGetSpaceHaar() 81 for (i = 0; i < len; i++) Iidx[i] = i + ilo * len; in PCDeflationGetSpaceHaar() 82 if (M % len && ihi == PetscCeilInt(M, len)) ihi -= 1; in PCDeflationGetSpaceHaar() 84 PetscCall(MatSetValues(defl, len, Iidx, 1, &i, col, INSERT_VALUES)); in PCDeflationGetSpaceHaar() 85 for (j = 0; j < len; j++) Iidx[j] += len; in PCDeflationGetSpaceHaar() 87 if (M % len && ihi + 1 == PetscCeilInt(M, len)) { in PCDeflationGetSpaceHaar() [all …]
|
| /petsc/config/BuildSystem/config/ |
| H A D | setsOrdered.py | 109 return len(self._data) 237 if len(self) <= len(other): 318 if len(self) > len(other): # Fast check for obvious cases 327 if len(self) < len(other): # Fast check for obvious cases 339 return len(self) < len(other) and self.issubset(other) 343 return len(self) > len(other) and self.issuperset(other) 374 value = len(self._data) 492 value = len(data) 534 self._data[element] = len(self._data) 539 self._data[transform()] = len(self._data) [all …]
|
| /petsc/src/binding/petsc4py/test/ |
| H A D | test_lgmap.py | 31 self.assertEqual(len(idx), size) 39 self.assertTrue(len(info) == 1) 41 self.assertTrue(len(info) > 1) 42 self.assertTrue(len(info) < 4) 120 self.assertEqual(len(idx), size // bs) 128 self.assertEqual(len(idx), size) 137 self.assertTrue(len(info) == 1) 139 self.assertTrue(len(info) > 1) 140 self.assertTrue(len(info) < 4) 146 self.assertTrue(len(info) == 1) [all …]
|
| /petsc/config/ |
| H A D | testparse.py | 75 if len(fileNums)>0: lineNum=fileNums[0]-1 77 if len(fileNums)>0: lineNum+=1 85 nspace=len(line)-len(line.lstrip(stripstr)) 92 if len(fileNums)>0: lineNum=fileNums[0]-1 95 if len(fileNums)>0: lineNum+=1 111 if len(fileNums)>0: 118 subnspace=len(line)-len(line.lstrip(stripstr)) 125 if len(fileNums)>0: 224 for i in range(len(intests)): 227 if len(loopVars['shared'])>0 and not final: [all …]
|
| H A D | report_tests.py | 21 if len(dirlist)>4: 22 lastfour=os.path.sep.join(dirlist[len(dirlist)-4:]) 48 if len(l)>1: 51 if len(l)==1: continue 108 nlim=(ntime if ntime<len(timelist) else len(timelist)) 134 for i in range(1,len(testname)): 200 if len(l)==1: continue 209 if len(testdata[pkgname]['problems'][probname]['stderr'])>0: 232 elif len(p['stderr'])>0: 242 elif len(p['diff'])>0: [all …]
|
| /petsc/src/mat/graphops/partition/ftn-custom/ |
| H A D | zpartitionf.c | 13 PetscInt len; in matpartitioningsetvertexweights_NOTODAY() local 15 *ierr = MatGetLocalSize((*part)->adj, &len, NULL); in matpartitioningsetvertexweights_NOTODAY() 17 *ierr = PetscMalloc1(len, &array); in matpartitioningsetvertexweights_NOTODAY() 19 *ierr = PetscArraycpy(array, weights, len); in matpartitioningsetvertexweights_NOTODAY()
|
| /petsc/src/vec/vec/interface/ftn-custom/ |
| H A D | zvectorf90.c | 27 PetscInt len; in vecgetarraywrite_() local 34 *ierr = VecGetLocalSize(*x, &len); in vecgetarraywrite_() 36 *ierr = F90Array1dCreate(fa, MPIU_SCALAR, 1, len, ptr PETSC_F90_2PTR_PARAM(ptrd)); in vecgetarraywrite_() 52 PetscInt len; in vecgetarray_() local 59 *ierr = VecGetLocalSize(*x, &len); in vecgetarray_() 61 *ierr = F90Array1dCreate(fa, MPIU_SCALAR, 1, len, ptr PETSC_F90_2PTR_PARAM(ptrd)); in vecgetarray_() 77 PetscInt len; in vecgetarrayread_() local 84 *ierr = VecGetLocalSize(*x, &len); in vecgetarrayread_() 86 *ierr = F90Array1dCreate((PetscScalar *)fa, MPIU_SCALAR, 1, len, ptr PETSC_F90_2PTR_PARAM(ptrd)); in vecgetarrayread_()
|
| /petsc/src/ksp/ksp/impls/gmres/agmres/ |
| H A D | agmresorthog.c | 123 PetscBLASInt pas, len, bnloc, bpos; in KSPAGMRESRoddec() local 150 PetscCall(PetscBLASIntCast(nloc - j, &len)); in KSPAGMRESRoddec() 152 PetscCallBLAS("BLASnrm2", rho = -PetscSign(Ajj) * BLASnrm2_(&len, &Qloc[j * nloc + j], &pas)); in KSPAGMRESRoddec() 156 len = len - 1; in KSPAGMRESRoddec() 158 PetscCallBLAS("BLASscal", BLASscal_(&len, &val, &Qloc[j * nloc + j + 1], &pas)); in KSPAGMRESRoddec() 160 len = len + 1; in KSPAGMRESRoddec() 162 …PetscCallBLAS("BLASdot", tt = tloc[j] * BLASdot_(&len, &Qloc[j * nloc + j], &pas, &Qloc[k * nloc +… in KSPAGMRESRoddec() 163 …PetscCallBLAS("BLASaxpy", BLASaxpy_(&len, &tt, &Qloc[j * nloc + j], &pas, &Qloc[k * nloc + j], &pa… in KSPAGMRESRoddec() 170 PetscCall(PetscBLASIntCast(nloc - j, &len)); in KSPAGMRESRoddec() 172 PetscCallBLAS("BLAScopy", BLAScopy_(&len, &Qloc[d * nloc + d], &bnloc, &wbufptr[d], &pas)); in KSPAGMRESRoddec() [all …]
|
| /petsc/src/sys/objects/ftn-custom/ |
| H A D | zstart.c | 109 PETSC_INTERN PetscErrorCode PetscInitFortran_Private(const char *filename, PetscInt len) in PetscInitFortran_Private() argument 118 while ((len > 0) && (filename[len - 1] == ' ')) len--; in PetscInitFortran_Private() 119 PetscCall(PetscMalloc1(len + 1, &tmp)); in PetscInitFortran_Private() 120 PetscCall(PetscStrncpy(tmp, filename, len + 1)); in PetscInitFortran_Private() 127 …(char *filename, char *help, PetscErrorCode *ierr, PETSC_FORTRAN_CHARLEN_T len, PETSC_FORTRAN_CHAR… in petscinitializef_() argument 174 *ierr = PetscInitialize_Common(name, filename, help, PETSC_TRUE, (PetscInt)len); in petscinitializef_()
|
| /petsc/src/sys/objects/ |
| H A D | options.c | 394 size_t len = 0; in Petscgetline() local 404 if (!fgets(buf + len, 1024, f)) buf[len] = 0; in Petscgetline() 405 PetscCallAbort(PETSC_COMM_SELF, PetscStrlen(buf, &len)); in Petscgetline() 406 last = len - 1; in Petscgetline() 408 if (len) return buf; in Petscgetline() 454 size_t len; in PetscOptionsInsertFilePetsc() local 492 PetscCall(PetscStrlen(string, &len)); in PetscOptionsInsertFilePetsc() 494 for (size_t i = 0; i < len; i++) { in PetscOptionsInsertFilePetsc() 510 PetscCall(PetscStrlen(tokens[0], &len)); in PetscOptionsInsertFilePetsc() 511 PetscCall(PetscSegBufferGet(vseg, len + 1, &vstring)); in PetscOptionsInsertFilePetsc() [all …]
|
| /petsc/include/ |
| H A D | petscstring.h | 100 static inline PetscErrorCode PetscStrlen(const char s[], size_t *len) in PetscStrlen() argument 103 PetscAssertPointer_Private(len, 2); in PetscStrlen() 106 *len = __builtin_strlen(s); in PetscStrlen() 108 *len = strlen(s); in PetscStrlen() 111 *len = 0; in PetscStrlen() 145 size_t len; in PetscStrallocpy() local 149 PetscCall(PetscStrlen(s, &len)); in PetscStrallocpy() 150 PetscCall(PetscMalloc1(len + 1, &tmp)); in PetscStrallocpy() 152 __builtin_memcpy(tmp, s, len); in PetscStrallocpy() 154 memcpy(tmp, s, len); in PetscStrallocpy() [all …]
|
| /petsc/src/sys/classes/viewer/impls/string/ |
| H A D | stringv.c | 84 PetscErrorCode PetscViewerStringOpen(MPI_Comm comm, char string[], size_t len, PetscViewer *lab) Pe… in PetscViewerStringOpen() argument 89 PetscCall(PetscViewerStringSetString(*lab, string, len)); in PetscViewerStringOpen() 164 PetscErrorCode PetscViewerStringGetStringRead(PetscViewer viewer, const char *string[], size_t *len… in PetscViewerStringGetStringRead() argument 174 if (len) *len = vstr->maxlen; in PetscViewerStringGetStringRead() 199 PetscErrorCode PetscViewerStringSetString(PetscViewer viewer, char string[], size_t len) PeNS in PetscViewerStringSetString() argument 209 …PetscCheck(len > 2, PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "String must have length at least 2… in PetscViewerStringSetString() 211 PetscCall(PetscArrayzero(string, len)); in PetscViewerStringSetString() 215 vstr->maxlen = len; in PetscViewerStringSetString()
|
| /petsc/src/sys/webclient/ |
| H A D | box.c | 276 size_t len, blen, rd; in PetscBoxUpload() local 290 len = 1024 + sb.st_size; in PetscBoxUpload() 291 PetscCall(PetscMalloc1(len, &body)); in PetscBoxUpload() 296 len)); in PetscBoxUpload() 297 PetscCall(PetscPushJSONValue(body, "title", filename, len)); in PetscBoxUpload() 298 PetscCall(PetscStrlcat(body, ",", len)); in PetscBoxUpload() 299 PetscCall(PetscPushJSONValue(body, "mimeType", "text.html", len)); in PetscBoxUpload() 300 PetscCall(PetscStrlcat(body, ",", len)); in PetscBoxUpload() 301 PetscCall(PetscPushJSONValue(body, "description", "a file", len)); in PetscBoxUpload() 306 len)); in PetscBoxUpload() [all …]
|
| H A D | client.c | 180 size_t request_len, len; in PetscHTTPSRequest() local 198 len = 0; in PetscHTTPSRequest() 205 r = SSL_read(ssl, buff + len, (int)buffsize); in PetscHTTPSRequest() 206 len += r; in PetscHTTPSRequest() 333 size_t len; in PetscPullJSONValue() local 340 PetscCall(PetscStrlen(work, &len)); in PetscPullJSONValue() 342 v += len; in PetscPullJSONValue() 344 work[len++ - 1] = 0; in PetscPullJSONValue() 351 v += len; in PetscPullJSONValue() 388 size_t len; in PetscPushJSONValue() local [all …]
|
| H A D | google.c | 127 size_t len, blen, rd; in PetscGoogleDriveUpload() local 141 len = 1024 + sb.st_size; in PetscGoogleDriveUpload() 142 PetscCall(PetscMalloc1(len, &body)); in PetscGoogleDriveUpload() 148 PetscCall(PetscPushJSONValue(body, "title", filename, len)); in PetscGoogleDriveUpload() 150 PetscCall(PetscPushJSONValue(body, "mimeType", "text.html", len)); in PetscGoogleDriveUpload() 152 PetscCall(PetscPushJSONValue(body, "description", "a file", len)); in PetscGoogleDriveUpload() 216 size_t len; in PetscGoogleDriveAuthorize() local 232 PetscCall(PetscStrlen(buff, &len)); in PetscGoogleDriveAuthorize() 233 buff[len - 1] = 0; /* remove carriage return at end of line */ in PetscGoogleDriveAuthorize()
|
| /petsc/src/dm/impls/plex/tests/ |
| H A D | ex10.c | 16 PetscInt len; in ProcessOptions() local 28 len = options->numFields; in ProcessOptions() 29 PetscCall(PetscCalloc1(len, &options->numComponents)); in ProcessOptions() 30 …_components", "The number of components per field", "ex10.c", options->numComponents, &len, &flg)); in ProcessOptions() 31 …| !(len != options->numFields), PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Length of components array … in ProcessOptions() 156 PetscInt len = (dim + 1) * PetscMax(1, user.numFields); in main() local 159 PetscCall(PetscCalloc1(len, &user.numDof)); in main() 161 …tionsIntArray("-num_dof", "The dof signature for the section", "ex10.c", user.numDof, &len, &flg)); in main() 162 …len == ((dim + 1) * PetscMax(1, user.numFields)), PETSC_COMM_SELF, PETSC_ERR_ARG_WRONG, "Length of… in main()
|
| /petsc/doc/manualpages/doctext/ |
| H A D | nroff.def | 9 # .HP len - hanging indent 10 # .IP name len - indented paragraph (typical use .IP \fIvalues\fP 1in) 11 # .TP len - hanging label (sets amount) 12 # .TP (no len) do label (? does indentation stick to subsequent paragraphs?) 24 # .PD len - paragraph distance ?
|
| /petsc/src/sys/dll/ |
| H A D | dl.c | 55 size_t len, blen; in PetscDLLibraryRetrieve() local 62 PetscCall(PetscStrlen(libname, &len)); in PetscDLLibraryRetrieve() 63 blen = PetscMax(4 * len, PETSC_MAX_PATH_LEN); in PetscDLLibraryRetrieve() 71 PetscCall(PetscStrlen(gz, &len)); in PetscDLLibraryRetrieve() 72 if (len != 3) gz = NULL; /* do not end (exactly) with .gz */ in PetscDLLibraryRetrieve() 76 PetscCall(PetscStrlen(par2, &len)); in PetscDLLibraryRetrieve() 77 if (par2[len - 1] == 'a' && par2[len - 2] == '.') par2[len - 2] = 0; in PetscDLLibraryRetrieve() 317 size_t len; in PetscDLLibraryAppend() local 332 PetscCall(PetscStrlen(program, &len)); in PetscDLLibraryAppend() 333 if (program[len - 1] == '/') { in PetscDLLibraryAppend() [all …]
|
| /petsc/src/ksp/pc/impls/tfs/ |
| H A D | xyt.c | 226 PetscInt off, len; in xyt_generate() local 360 len = *iptr++; in xyt_generate() 361 PetscCall(PetscBLASIntCast(len, &dlen)); in xyt_generate() 363 y_ptr += len; in xyt_generate() 375 len = *iptr++; in xyt_generate() 376 PetscCall(PetscBLASIntCast(len, &dlen)); in xyt_generate() 378 x_ptr += len; in xyt_generate() 409 off = len = 0; in xyt_generate() 412 len = k; in xyt_generate() 420 len -= (off - 1); in xyt_generate() [all …]
|