Skip to content

Commit 8e3acea

Browse files
authored
fixed broken links in parallel (MicrosoftDocs#99)
1 parent 81e0d6b commit 8e3acea

38 files changed

+937
-269
lines changed

docs/atl-mfc-shared/reference/csimplestringt-class.md

Lines changed: 39 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ static void CopyCharsOverlapped(XCHAR* pchDest, const XCHAR* pchSrc, int nChars
268268
Call this method to copy characters from `pchSrc` to the `pchDest` string. Unlike `CopyChars`, `CopyCharsOverlapped` provides a safe method for copying from character buffers that might be overlapped.
269269

270270
## Example
271-
See the example for [CSimpleStringT::CopyChars](#csimplestringt__CopyChars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
271+
See the example for [CSimpleStringT::CopyChars](#csimplestringt__copychars), or the source code for `CSimpleStringT::SetString` (located in atlsimpstr.h).
272272

273273
### Requirements
274274
**Header:** atlsimpstr.h
@@ -356,7 +356,7 @@ Frees any extra memory previously allocated by the string but no longer needed.
356356
void FreeExtra();
357357
```
358358
### Remarks
359-
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__GetLength).
359+
This should reduce the memory overhead consumed by the string object. The method reallocates the buffer to the exact length returned by [GetLength](#csimplestringt__getlength).
360360

361361
## Example
362362
```cpp
@@ -409,7 +409,7 @@ int GetAllocLength() const throw();
409409
The number of characters allocated for this object.
410410
411411
### Remarks
412-
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
412+
Call this method to determine the number of characters allocated for this `CSimpleStringT` object. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
413413
414414
### Requirements
415415
**Header:** atlsimpstr.h
@@ -426,7 +426,7 @@ XCHAR GetAt(int iChar
426426
```
427427
#### Parameters
428428
`iChar`
429-
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength). Otherwise, `GetAt` will generate an exception.
429+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength). Otherwise, `GetAt` will generate an exception.
430430

431431
### Return Value
432432
An `XCHAR` that contains the character at the specified position in the string.
@@ -458,15 +458,15 @@ PXSTR GetBuffer();
458458
`nMinBufferLength`
459459
The minimum number of characters that the character buffer can hold. This value does not include space for a null terminator.
460460
461-
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__LockBuffer) on this buffer, you lose the buffer lock.
461+
If `nMinBufferLength` is larger than the length of the current buffer, `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the object reference count to zero. If you have previously called [LockBuffer](#csimplestringt__lockbuffer) on this buffer, you lose the buffer lock.
462462
463463
### Return Value
464464
An `PXSTR` pointer to the object's (null-terminated) character buffer.
465465
466466
### Remarks
467467
Call this method to return the buffer contents of the `CSimpleStringT` object. The returned `PXSTR` is not a constant and therefore allows direct modification of `CSimpleStringT` contents.
468468
469-
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__ReleaseBuffer) before you use any other `CSimpleStringT` member methods.
469+
If you use the pointer returned by `GetBuffer` to change the string contents, you must call [ReleaseBuffer](#csimplestringt__releasebuffer) before you use any other `CSimpleStringT` member methods.
470470
471471
The address returned by `GetBuffer` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reallocated if you do not change the length of the `CSimpleStringT`.
472472
@@ -511,7 +511,7 @@ PXSTR GetBufferSetLength(int nLength);
511511
### Remarks
512512
Call this method to retrieve a specified length of the internal buffer of the `CSimpleStringT` object. The returned `PXSTR` pointer is not `const` and thus allows direct modification of `CSimpleStringT` contents.
513513

514-
If you use the pointer returned by [GetBufferSetLength](#vclrfcsimplestringtgetbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
514+
If you use the pointer returned by [GetBufferSetLength](#csimplestringt__getbuffersetlength) to change the string contents, call `ReleaseBuffer` to update the internal state of `CsimpleStringT` before you use any other `CSimpleStringT` methods.
515515

516516
The address returned by `GetBufferSetLength` may not be valid after the call to `ReleaseBuffer` because additional `CSimpleStringT` operations can cause the `CSimpleStringT` buffer to be reallocated. The buffer is not reassigned if you do not change the length of the `CSimpleStringT`.
517517

@@ -563,7 +563,7 @@ int GetLength() const throw();
563563
### Remarks
564564
Call this method to return the number of characters in the object. The count does not include a null terminator.
565565
566-
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__FreeExtra) for an example of calling this function.
566+
For multibyte character sets (MBCS), `GetLength` counts each 8-bit character; that is, a lead and trail byte in one multibyte character are counted as two bytes. See [FreeExtra](#csimplestringt__freeextra) for an example of calling this function.
567567
568568
### Requirements
569569
**Header:** atlsimpstr.h
@@ -665,10 +665,10 @@ PXSTR LockBuffer();
665665
666666
By locking the string in the buffer, you ensure that the string's exclusive hold on the buffer will remain intact.
667667
668-
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__UnlockBuffer) to reset the reference count to 1.
668+
After you have finished with `LockBuffer`, call [UnlockBuffer](#csimplestringt__unlockbuffer) to reset the reference count to 1.
669669
670670
> [!NOTE]
671-
> If you call [GetBuffer](#csimplestringt__GetBuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
671+
> If you call [GetBuffer](#csimplestringt__getbuffer) on a locked buffer and you set the `GetBuffer` parameter `nMinBufferLength` to greater than the length of the current buffer, you will lose the buffer lock. Such a call to `GetBuffer` destroys the current buffer, replaces it with a buffer of the requested size, and resets the reference count to zero.
672672
673673
For more information about reference counting, see the following articles:
674674
@@ -708,7 +708,7 @@ XCHAR operator[](int iChar
708708
Zero-based index of a character in the string.
709709

710710
### Remarks
711-
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__GetAt) member function.
711+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
712712

713713
> [!NOTE]
714714
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
@@ -723,6 +723,27 @@ ASSERT(s[1] == _T('b'));
723723
724724
### Requirements
725725
**Header:** atlsimpstr.h
726+
727+
## <a name="csimplestringt__operator_at"></a> CSimpleStringT::operator \[\]
728+
Call this function to access a single character of the character array.
729+
730+
### Syntax
731+
732+
```
733+
734+
XCHAR operator[]( int iChar ) const;
735+
```
736+
737+
### Parameters
738+
`iChar`
739+
Zero-based index of a character in the string.
740+
741+
### Remarks
742+
The overloaded subscript (`[]`) operator returns a single character specified by the zero-based index in `iChar`. This operator is a convenient substitute for the [GetAt](#csimplestringt__getat) member function.
743+
744+
> [!NOTE]
745+
> You can use the subscript (`[]`) operator to get the value of a character in a `CSimpleStringT`, but you cannot use it to change the value of a character in a `CSimpleStringT`.
746+
726747
727748
## <a name="csimplestringt__operator_add_eq"></a> CSimpleStringT::operator +=
728749
Joins a new string or character to the end of an existing string.
@@ -916,7 +937,7 @@ typedef ChTraitsBase< BaseType >::PXSTR PXSTR;
916937
917938
918939
## <a name="csimplestringt__releasebuffer"></a> CSimpleStringT::ReleaseBuffer
919-
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__GetBuffer).
940+
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__getbuffer).
920941
921942
### Syntax
922943
@@ -928,7 +949,7 @@ void ReleaseBuffer(int nNewLength = -1);
928949
The new length of the string in characters, not counting a null terminator. If the string is null terminated, the -1 default value sets the `CSimpleStringT` size to the current length of the string.
929950
930951
### Remarks
931-
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__GetBuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
952+
Call this method to reallocate or free up the buffer of the string object. If you know that the string in the buffer is null terminated, you can omit the `nNewLength` argument. If your string is not null terminated, use `nNewLength` to specify its length. The address returned by [GetBuffer](#csimplestringt__getbuffer) is invalid after the call to `ReleaseBuffer` or any other `CSimpleStringT` operation.
932953
933954
## Example
934955
The following example demonstrates the use of `CSimpleStringT::ReleaseBuffer`.
@@ -950,7 +971,7 @@ ASSERT(s.GetLength() == 3); // Length still 3
950971

951972
## <a name="csimplestringt__releasebuffersetlength"></a> CSimpleStringT::ReleaseBufferSetLength
952973

953-
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__GetBuffer).
974+
Releases control of the buffer allocated by [GetBuffer](#csimplestringt__getbuffer).
954975

955976
### Syntax
956977

@@ -962,7 +983,7 @@ void ReleaseBufferSetLength(int nNewLength);
962983
The length of the string being released
963984

964985
### Remarks
965-
This function is functionally similar to [ReleaseBuffer](#csimplestringt__ReleaseBuffer) except that a valid length for the string object must be passed.
986+
This function is functionally similar to [ReleaseBuffer](#csimplestringt__releasebuffer) except that a valid length for the string object must be passed.
966987

967988
### Requirements
968989
**Header:** atlsimpstr.h
@@ -979,7 +1000,7 @@ void SetAt(int iChar, XCHAR ch);
9791000
```
9801001
#### Parameters
9811002
`iChar`
982-
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__GetLength).
1003+
Zero-based index of the character in the `CSimpleStringT` object. The `iChar` parameter must be greater than or equal to 0 and less than the value returned by [GetLength](#csimplestringt__getlength).
9831004

9841005
*ch*
9851006
The new character.
@@ -1116,7 +1137,7 @@ void Truncate(int nNewLength);
11161137
Call this method to truncate the contents of the string to the new length.
11171138

11181139
> [!NOTE]
1119-
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__FreeExtra) and [Preallocate](#csimplestringt__Preallocate).
1140+
> This does not affect the allocated length of the buffer. To decrease or increase the current buffer, see [FreeExtra](#csimplestringt__freeextra) and [Preallocate](#csimplestringt__preallocate).
11201141
11211142
## Example
11221143
The following example demonstrates the use of `CSimpleStringT::Truncate`.
@@ -1146,7 +1167,7 @@ void UnlockBuffer() throw();
11461167
### Remarks
11471168
Call this method to reset the reference count of the string to 1.
11481169
1149-
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__LockBuffer).
1170+
The `CSimpleStringT` destructor automatically calls `UnlockBuffer` to ensure that the buffer is not locked when the destructor is called. For an example of this method, see [LockBuffer](#csimplestringt__lockbuffer).
11501171
11511172
### Requirements
11521173
**Header:** atlsimpstr.h

docs/parallel/amp/cpp-amp-overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ void CppAmpMethod() {
132132
You must define the data values and declare the shape of the data before you can run the kernel code. All data is defined to be an array (rectangular), and you can define the array to have any rank (number of dimensions). The data can be any size in any of the dimensions.
133133

134134
### index Class
135-
The [index Class](../../parallel/amp/reference/index-class.md) specifies a location in the `array` or `array_view` object by encapsulating the offset from the origin in each dimension into one object. When you access a location in the array, you pass an `index` object to the indexing operator, `[]`, instead of a list of integer indexes. You can access the elements in each dimension by using the [array::operator() Operator](reference/array-class.md#array__operator_call)%20Operator.md) or the [array_view::operator() Operator](reference/array-view-class.md#array__operator_call).
135+
The [index Class](../../parallel/amp/reference/index-class.md) specifies a location in the `array` or `array_view` object by encapsulating the offset from the origin in each dimension into one object. When you access a location in the array, you pass an `index` object to the indexing operator, `[]`, instead of a list of integer indexes. You can access the elements in each dimension by using the [array::operator() Operator](reference/array-class.md#array__operator_call) or the [array_view::operator() Operator](reference/array-view-class.md#array_view__operator_call).
136136

137137
The following example creates a one-dimensional index that specifies the third element in a one-dimensional `array_view` object. The index is used to print the third element in the `array_view` object. The output is 3.
138138

@@ -269,7 +269,7 @@ for (int i = 0; i <5; i++)
269269
### Shared memory with array and array_view
270270
Shared memory is memory that can be accessed by both the CPU and the accelerator. The use of shared memory eliminates or significantly reduces the overhead of copying data between the CPU and the accelerator. Although the memory is shared, it cannot be accessed concurrently by both the CPU and the accelerator, and doing so causes undefined behavior.
271271

272-
`array` objects can be used to specify fine-grained control over the use of shared memory if the associated accelerator supports it. Whether an accelerator supports shared memory is determined by the accelerator’s [supports_cpu_shared_memory](reference/accelerator-class.md#accelerator__supports_cpu_shared_memory) property, which returns `true` when shared memory is supported. If shared memory is supported, the default [access_type Enumeration](reference/concurrency-namespace-enums-amp.md#access_type) for memory allocations on the accelerator is determined by the `default_cpu_access_type` property. By default, `array` and `array_view` objects take on the same `access_type` as the primary associated `accelerator`.
272+
`array` objects can be used to specify fine-grained control over the use of shared memory if the associated accelerator supports it. Whether an accelerator supports shared memory is determined by the accelerator’s [supports_cpu_shared_memory](reference/accelerator-class.md#accelerator__supports_cpu_shared_memory_data_member) property, which returns `true` when shared memory is supported. If shared memory is supported, the default [access_type Enumeration](reference/concurrency-namespace-enums-amp.md#access_type) for memory allocations on the accelerator is determined by the `default_cpu_access_type` property. By default, `array` and `array_view` objects take on the same `access_type` as the primary associated `accelerator`.
273273

274274
By setting the [array::cpu_access_type Data Member](reference/array-class.md#array__cpu_access_type_data_member) property of an `array` explicitly, you can exercise fine-grained control over how shared memory is used, so that you can optimize the app for the hardware’s performance characteristics, based on the memory access patterns of its computation kernels. An `array_view` reflects the same `cpu_access_type` as the `array` that it’s associated with; or, if the array_view is constructed without a data source, its `access_type` reflects the environment that first causes it to allocate storage. That is, if it’s first accessed by the host (CPU), then it behaves as if it were created over a CPU data source and shares the `access_type` of the `accelerator_view` associated by capture; however, if it's first accessed by an `accelerator_view`, then it behaves as if it were created over an `array` created on that `accelerator_view` and shares the `array`’s `access_type`.
275275

0 commit comments

Comments
 (0)