cpp/examples/string_transforms/README.md
This C++ example demonstrates using libcudf transform API to access and create strings columns.
The example source code loads a csv file and produces a transformed column from the table using the values from the tables.
The following examples are included:
localize_phone_jit - Using a transform to branch on input columns and returning string valueslocalize_phone_precompiled - Performs same transformation on the table as branching but uses precompiled public APIscompute_checksum_jit - Using a transform to perform a fused checksum on two columnsextract_email_jit - Using a transform to get a substring from a kernelextract_email_precompiled - Performs same transformation on the table as output but uses precompiled public APIsformat_phone_jit - Using a transform kernel to output a string to a pre-allocated bufferformat_phone_precompiled - Performs same transformation on the table as preallocated but uses precompiled public APIs# Configure project
cmake -S . -B build/
# Build
cmake --build build/ --parallel $PARALLEL_LEVEL
# Execute
build/output info.csv output.csv 100000
If your machine does not come with a pre-built libcudf binary, expect the
first build to take some time, as it would build libcudf on the host machine.
It may be sped up by configuring the proper PARALLEL_LEVEL number.