Skip to content

Commit 8b72fe5

Browse files
committed
Add docs.
1 parent 2e1c5e8 commit 8b72fe5

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

com.ibm.wala.cast.python.ml/source/com/ibm/wala/cast/python/ml/client/TensorGenerator.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@ public Set<TensorType> getTensorTypes(PropagationCallGraphBuilder builder) {
7777
return ret;
7878
}
7979

80+
/**
81+
* Returns the possible shapes of the tensor returned by this generator.
82+
*
83+
* @param builder The {@link PropagationCallGraphBuilder} used to build the call graph.
84+
* @param pointsToSet The points-to set of the shape argument.
85+
* @return A set of possible shapes of the tensor returned by this generator.
86+
*/
8087
protected Set<List<Dimension<?>>> getShapes(
8188
PropagationCallGraphBuilder builder, Iterable<InstanceKey> pointsToSet) {
8289
Set<List<Dimension<?>>> ret = HashSetFactory.make();
@@ -223,6 +230,14 @@ protected Set<List<Dimension<?>>> getShapes(PropagationCallGraphBuilder builder)
223230
return getShapes(builder, pointsToSet);
224231
}
225232

233+
/**
234+
* Returns the possible shapes of the tensor returned by this generator. The shape is inferred
235+
* from the argument represented by the given value number.
236+
*
237+
* @param builder The {@link PropagationCallGraphBuilder} used to build the call graph.
238+
* @param valueNumber The value number of the argument from which to infer the shape.
239+
* @return A set of possible shapes of the tensor returned by this generator.
240+
*/
226241
protected Set<List<Dimension<?>>> getShapes(
227242
PropagationCallGraphBuilder builder, int valueNumber) {
228243
Set<List<Dimension<?>>> ret = HashSetFactory.make();
@@ -373,6 +388,14 @@ protected EnumSet<DType> getDTypes(PropagationCallGraphBuilder builder) {
373388
return getDTypes(builder, pointsToSet);
374389
}
375390

391+
/**
392+
* Returns the possible dtypes of the tensor returned by this generator. The dtype is inferred
393+
* from the argument represented by the given value number.
394+
*
395+
* @param builder The {@link PropagationCallGraphBuilder} used to build the call graph.
396+
* @param valueNumber The value number of the argument from which to infer the dtype.
397+
* @return A set of possible dtypes of the tensor returned by this generator.
398+
*/
376399
protected EnumSet<DType> getDTypes(PropagationCallGraphBuilder builder, int valueNumber) {
377400
EnumSet<DType> ret = EnumSet.noneOf(DType.class);
378401
PointerAnalysis<InstanceKey> pointerAnalysis = builder.getPointerAnalysis();

0 commit comments

Comments
 (0)